package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class SysUser implements Serializable {

	private static final long serialVersionUID = 1206087960736909862L;

	//fields
	private java.lang.Integer userId;
	private java.lang.String loginName;
	private java.lang.String password;
	private java.lang.String userName;
	private java.lang.Integer deptId;
	private java.lang.String gender;
	private java.lang.String status;
	private java.sql.Timestamp lastLogin;
	private java.sql.Timestamp createTime;

	//default constructor
	public SysUser() {
	}

	//getter
	public java.lang.Integer getUserId() {
		return userId;
	}
	public java.lang.String getLoginName() {
		return loginName;
	}
	public java.lang.String getPassword() {
		return password;
	}
	public java.lang.String getUserName() {
		return userName;
	}
	public java.lang.Integer getDeptId() {
		return deptId;
	}
	public java.lang.String getGender() {
		return gender;
	}
	public java.lang.String getStatus() {
		return status;
	}
	public java.sql.Timestamp getLastLogin() {
		return lastLogin;
	}
	public java.sql.Timestamp getCreateTime() {
		return createTime;
	}

	//setter
	public void setUserId(java.lang.Integer userId) {
		this.userId = userId;
	}
	public void setLoginName(java.lang.String loginName) {
		this.loginName = loginName;
	}
	public void setPassword(java.lang.String password) {
		this.password = password;
	}
	public void setUserName(java.lang.String userName) {
		this.userName = userName;
	}
	public void setDeptId(java.lang.Integer deptId) {
		this.deptId = deptId;
	}
	public void setGender(java.lang.String gender) {
		this.gender = gender;
	}
	public void setStatus(java.lang.String status) {
		this.status = status;
	}
	public void setLastLogin(java.sql.Timestamp lastLogin) {
		this.lastLogin = lastLogin;
	}
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof SysUser))
			return false;

		final SysUser sysUser = (SysUser)other;
		if (!this.userId.equals(sysUser.getUserId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(userId).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("SysUser[")
			.append("userId=").append(userId).append(", ")
			.append("loginName=").append(loginName).append(", ")
			.append("password=").append(password).append(", ")
			.append("userName=").append(userName).append(", ")
			.append("deptId=").append(deptId).append(", ")
			.append("gender=").append(gender).append(", ")
			.append("status=").append(status).append(", ")
			.append("lastLogin=").append(lastLogin).append(", ")
			.append("createTime=").append(createTime).append("]").toString();
	}
}